]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/volume: Ignore capitalization for headphone detection
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 12 Mar 2023 21:55:45 +0000 (22:55 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 21 Apr 2023 18:53:00 +0000 (18:53 +0000)
When we can't detect a headphone by form factor, we do a string
match on the port name. A match on 'Headphone' isn't less likely
to be valid than a match on 'headphone', so make sure we ignore
capitalization.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2691>

js/ui/status/volume.js

index fd6c8e7d6ab0d3e5af4ccc39c81553516b82428f..91706343a2524ee65564007350dd9d58dfeed6dd 100644 (file)
@@ -319,7 +319,7 @@ class OutputStreamSlider extends StreamSlider {
         // of different identifiers for headphones, and I could
         // not find the complete list
         if (sink.get_ports().length > 0)
-            return sink.get_port().port.includes('headphone');
+            return sink.get_port().port.toLowerCase().includes('headphone');
 
         return false;
     }